//
//  OKWebViewURLFilter.h
//  Onskysell
//
//  Created by cg on 17/3/6.
//  Copyright © 2017年 cg. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TZImagePickerController.h"

#import <WebKit/WebKit.h>

@interface OKWebViewURLFilter : NSObject<TZImagePickerControllerDelegate>

@property (nonatomic, assign) UInt64 startTimeMsecs;//web加载开始时间
@property (nonatomic, assign) UInt64 endTimeMSecs;//web加载结束时间

@property (nonatomic, strong) WKNavigation *backNavigation;//存储webview发生返回操作时的标识符
@property (nonatomic, assign) BOOL hasUpdateToken;//是否上传过token
/**
 单例

 @return OKWebViewURLFilter
 */
+ (OKWebViewURLFilter *)shared;

/**
 过滤地址

 @param request 地址
 @param viewController viewController
 @return return BOOL - NO不允许load,YES允许load
 */
- (BOOL)filter:(NSURLRequest *)request WebView:(WKWebView *)webview viewController:(UIViewController *)viewController;

//过滤是否CGLodingView start
- (BOOL)filterLoadingUrl:(NSString *)url;
/**
 查看web加载开始结束时间差(需在web加载时先设startTimeMsecs)
 
 */
- (void)showLoadTimeDif;


@end
